package com.minis.main;

/**
 * Create by chen on 2025/8/9 15:51
 */
public class BService {
    private String name;
    private String age;

    private CService cService;

    public BService(String name, String age) {
        this.name = name;
        this.age = age;
    }

    public BService(String name, String age, CService cService) {
        this.name = name;
        this.age = age;
        this.cService = cService;
    }

    public void setCService(CService cService) {
        this.cService = cService;
    }

    public void hello() {
        System.out.println("BService: hello, I'm " + name + ", " + age + " years old.");
        cService.hello();
    }
}
